package com.dynamixsoftware.printershare.smb.dcerpc.msrpc;

import com.dynamixsoftware.printershare.smb.dcerpc.DcerpcMessage;
import com.dynamixsoftware.printershare.smb.dcerpc.ndr.NdrBuffer;
import com.dynamixsoftware.printershare.smb.dcerpc.ndr.NdrException;
import com.dynamixsoftware.printershare.smb.dcerpc.ndr.NdrObject;

public class srvsvc
{
  public static String getSyntax()
  {
    return "4b324fc8-1670-01d3-1278-5a47bf6ee188:3.0";
  }
  
  static class ShareEnumAll
    extends DcerpcMessage
  {
    NdrObject info;
    private int level;
    private int prefmaxlen;
    private int resume_handle;
    public int retval;
    private String servername;
    
    ShareEnumAll(String paramString, int paramInt1, NdrObject paramNdrObject, int paramInt2, int paramInt3, int paramInt4)
    {
      this.servername = paramString;
      this.level = paramInt1;
      this.info = paramNdrObject;
      this.prefmaxlen = paramInt2;
      this.resume_handle = paramInt4;
    }
    
    public void decode_out(NdrBuffer paramNdrBuffer)
      throws NdrException
    {
      this.level = paramNdrBuffer.dec_ndr_long();
      paramNdrBuffer.dec_ndr_long();
      if (paramNdrBuffer.dec_ndr_long() != 0)
      {
        if (this.info == null) {
          this.info = new srvsvc.ShareInfoCtr0(null);
        }
        paramNdrBuffer = paramNdrBuffer.deferred;
        this.info.decode(paramNdrBuffer);
      }
      paramNdrBuffer.dec_ndr_long();
      this.resume_handle = paramNdrBuffer.dec_ndr_long();
      paramNdrBuffer.dec_ndr_long();
    }
    
    public void encode_in(NdrBuffer paramNdrBuffer)
      throws NdrException
    {
      paramNdrBuffer.enc_ndr_referent(this.servername, 1);
      if (this.servername != null) {
        paramNdrBuffer.enc_ndr_string(this.servername);
      }
      paramNdrBuffer.enc_ndr_long(this.level);
      paramNdrBuffer.enc_ndr_long(this.level);
      paramNdrBuffer.enc_ndr_referent(this.info, 1);
      if (this.info != null)
      {
        paramNdrBuffer = paramNdrBuffer.deferred;
        this.info.encode(paramNdrBuffer);
      }
      paramNdrBuffer.enc_ndr_long(this.prefmaxlen);
      paramNdrBuffer.enc_ndr_long(this.resume_handle);
    }
    
    public int getOpnum()
    {
      return 15;
    }
  }
  
  private static class ShareInfo0
    extends NdrObject
  {
    private String netname;
    
    public ShareInfo0(Object object) {
		// TODO Auto-generated constructor stub
	}

	public void decode(NdrBuffer paramNdrBuffer)
      throws NdrException
    {
      paramNdrBuffer.align(4);
      if (paramNdrBuffer.dec_ndr_long() != 0) {
        this.netname = paramNdrBuffer.deferred.dec_ndr_string();
      }
    }
    
    public void encode(NdrBuffer paramNdrBuffer)
      throws NdrException
    {
      paramNdrBuffer.align(4);
      paramNdrBuffer.enc_ndr_referent(this.netname, 1);
      if (this.netname != null) {
        paramNdrBuffer.deferred.enc_ndr_string(this.netname);
      }
    }
  }
  
  static class ShareInfo1
    extends NdrObject
  {
    String netname;
    String remark;
    int type;
    
    public void decode(NdrBuffer paramNdrBuffer)
      throws NdrException
    {
      paramNdrBuffer.align(4);
      int i = paramNdrBuffer.dec_ndr_long();
      this.type = paramNdrBuffer.dec_ndr_long();
      int j = paramNdrBuffer.dec_ndr_long();
      if (i != 0)
      {
        paramNdrBuffer = paramNdrBuffer.deferred;
        this.netname = paramNdrBuffer.dec_ndr_string();
      }
      if (j != 0) {
        this.remark = paramNdrBuffer.deferred.dec_ndr_string();
      }
    }
    
    public void encode(NdrBuffer paramNdrBuffer)
      throws NdrException
    {
      paramNdrBuffer.align(4);
      paramNdrBuffer.enc_ndr_referent(this.netname, 1);
      paramNdrBuffer.enc_ndr_long(this.type);
      paramNdrBuffer.enc_ndr_referent(this.remark, 1);
      if (this.netname != null)
      {
        paramNdrBuffer = paramNdrBuffer.deferred;
        paramNdrBuffer.enc_ndr_string(this.netname);
      }
      if (this.remark != null) {
        paramNdrBuffer.deferred.enc_ndr_string(this.remark);
      }
    }
  }
  
  private static class ShareInfoCtr0
    extends NdrObject
  {
    private srvsvc.ShareInfo0[] array;
    private int count;
    
    public ShareInfoCtr0(Object object) {
		// TODO Auto-generated constructor stub
	}

	public void decode(NdrBuffer paramNdrBuffer)
      throws NdrException
    {
      paramNdrBuffer.align(4);
      this.count = paramNdrBuffer.dec_ndr_long();
      if (paramNdrBuffer.dec_ndr_long() != 0)
      {
        NdrBuffer localNdrBuffer1 = paramNdrBuffer.deferred;
        int i = localNdrBuffer1.dec_ndr_long();
        int j = localNdrBuffer1.index;
        localNdrBuffer1.advance(i * 4);
        if (this.array == null)
        {
          if ((i < 0) || (i > 65535)) {
            throw new NdrException("invalid array conformance");
          }
          this.array = new srvsvc.ShareInfo0[i];
        }
        NdrBuffer localNdrBuffer2 = localNdrBuffer1.derive(j);
        for (int k = 0; k < i; k++)
        {
          if (this.array[k] == null) {
            this.array[k] = new srvsvc.ShareInfo0(null);
          }
          this.array[k].decode(localNdrBuffer2);
        }
      }
    }
    
    public void encode(NdrBuffer paramNdrBuffer)
      throws NdrException
    {
      paramNdrBuffer.align(4);
      paramNdrBuffer.enc_ndr_long(this.count);
      paramNdrBuffer.enc_ndr_referent(this.array, 1);
      if (this.array != null)
      {
        NdrBuffer localNdrBuffer1 = paramNdrBuffer.deferred;
        int i = this.count;
        localNdrBuffer1.enc_ndr_long(i);
        int j = localNdrBuffer1.index;
        localNdrBuffer1.advance(i * 4);
        NdrBuffer localNdrBuffer2 = localNdrBuffer1.derive(j);
        for (int k = 0; k < i; k++) {
          this.array[k].encode(localNdrBuffer2);
        }
      }
    }
  }
  
  static class ShareInfoCtr1
    extends NdrObject
  {
    srvsvc.ShareInfo1[] array;
    int count;
    
    public void decode(NdrBuffer paramNdrBuffer)
      throws NdrException
    {
      paramNdrBuffer.align(4);
      this.count = paramNdrBuffer.dec_ndr_long();
      if (paramNdrBuffer.dec_ndr_long() != 0)
      {
        NdrBuffer localNdrBuffer1 = paramNdrBuffer.deferred;
        int i = localNdrBuffer1.dec_ndr_long();
        int j = localNdrBuffer1.index;
        localNdrBuffer1.advance(i * 12);
        if (this.array == null)
        {
          if ((i < 0) || (i > 65535)) {
            throw new NdrException("invalid array conformance");
          }
          this.array = new srvsvc.ShareInfo1[i];
        }
        NdrBuffer localNdrBuffer2 = localNdrBuffer1.derive(j);
        for (int k = 0; k < i; k++)
        {
          if (this.array[k] == null) {
            this.array[k] = new srvsvc.ShareInfo1();
          }
          this.array[k].decode(localNdrBuffer2);
        }
      }
    }
    
    public void encode(NdrBuffer paramNdrBuffer)
      throws NdrException
    {
      paramNdrBuffer.align(4);
      paramNdrBuffer.enc_ndr_long(this.count);
      paramNdrBuffer.enc_ndr_referent(this.array, 1);
      if (this.array != null)
      {
        NdrBuffer localNdrBuffer1 = paramNdrBuffer.deferred;
        int i = this.count;
        localNdrBuffer1.enc_ndr_long(i);
        int j = localNdrBuffer1.index;
        localNdrBuffer1.advance(i * 12);
        NdrBuffer localNdrBuffer2 = localNdrBuffer1.derive(j);
        for (int k = 0; k < i; k++) {
          this.array[k].encode(localNdrBuffer2);
        }
      }
    }
  }
}


/* Location:           C:\Users\Admin\Desktop\Decompiler\JAD\jd-gui-0.3.6.windows\classes_dex2jar.jar
 * Qualified Name:     com.dynamixsoftware.printershare.smb.dcerpc.msrpc.srvsvc
 * JD-Core Version:    0.7.0.1
 */